import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import * as echarts from 'echarts';
import store from '@/store';
Vue.prototype.$echarts = echarts

// 一定要引入css样式不然无法使用
import 'element-ui/lib/theme-chalk/index.css';

import './permission'

// 全局组件
import Header from '@/components/Header';
import Aside from '@/components/Aside';
import Pagination from '@/components/Pagination';

Vue.config.productionTip = false

Vue.use(ElementUI);
Vue.component(Header.name, Header);
Vue.component(Aside.name, Aside);
Vue.component(Pagination.name, Pagination);

Vue.directive('title', {
	inserted: function (el, binding) {
	  document.title = el.dataset.title
	}
  })
  

new Vue({
	render: h => h(App),
	router,
	store
}).$mount('#app')
